package com.vsked.util;

public class TransFormDataType {
	
	public static String getSqlServerDataType(int n) {
		String t = "String";
		if(n==48 || n==52 || n==56 ||n==104 || n==127) t="int";
		else{t="String";}
		return t;
	}
	public static String getMySqlDataType(String inT){
		if("int".equals(inT))
			return inT;
		else if("varchar".equals(inT))
			return "String";
		else if("datetime".equals(inT))
			return "String";
		else
			return "String";
	}
	public static String transFormSqlServerDataTypeToJava(int n) {
		String t = "String";
		switch (n) {
		case -5:
			t = "int";
			break;
		case 1:
			t = "char";
			break;
		case 3:
			t = "float";
			break;
		case 4:
			t = "int";
			break;
		case 6:
			t = "float";
			break;
		case 12:
			t = "String";
			break;
		case 93:
			t = "String";
			break;
		default:
			t = "String";
			break;
		}
		return t;
	}
	
	/*	
	public String getSqlServerDataTypeFull(int n){
		String t="String";
		switch (n) {
		case 34: t="image"; break;
		case 35: t="text"; break;
		case 36: t="uniqueidentifier"; break;
		case 48: t="tinyint"; break;
		case 52: t="smallint"; break;
		case 56: t="int"; break;
		case 58: t="smalldatetime"; break;
		case 59: t="real"; break;
		case 60: t="money"; break;
		case 61: t="datetime"; break;
		case 62: t="float"; break;
		case 98: t="sql_variant"; break;
		case 99: t="ntext"; break;
		case 104: t="bit"; break;
		case 106: t="decimal"; break;
		case 108: t="numeric"; break;
		case 122: t="smallmoney"; break;
		case 127: t="bigint"; break;
		case 165: t="varbinary"; break;
		case 167: t="varchar"; break;
		case 173: t="binary"; break;
		case 175: t="char"; break;
		case 189: t="timestamp"; break;
		case 231: t="nvarchar"; break;
		case 239: t="nchar"; break;
		default:
			t = "String";
			break;
		}
		return t;
	}
    */
}//end class
